if [ -e $UPGRADEFILE -a "$1" != "restart" -a "$1" != "force-reload" ]; then
SSD_ARG="--startas $DAEMON"
rm -f $UPGRADEFILE
else
SSD_ARG="--exec $DAEMON"
fi
# Allow cdd to override the config
if [ -f /etc/gdm/gdm-cdd.conf ]; then
CONFIG_FILE="--config=/etc/gdm/gdm-cdd.conf"
fi
test -x $DAEMON || exit 0
if [ -r /etc/environment ]; then
if LANG=$(pam_getenv -l LANG); then
export LANG
fi
if LANGUAGE=$(pam_getenv -l LANGUAGE); then
export LANGUAGE
fi
fi
. /lib/lsb/init-functions
case "$1" in
start)
if [ -e "$DEFAULT_DISPLAY_MANAGER_FILE" -a "$HEED_DEFAULT_DISPLAY_MANAGER" = "true" -a "$(cat $DEFAULT_DISPLAY_MANAGER_FILE 2>/dev/null)" != "$DAEMON" ]; then
log_warning_msg "Not starting GNOME Display Manager (gdm); it is not the default display manager."
else
log_begin_msg "Starting GNOME Display Manager..."
# if usplash is running, make sure to stop it now, yes "start" kills it.